<?php
$hasError=false;
$username = $_POST["username"];
if(!$username){
    echo "用户名必须填写<br/>";
    $hasError=true;
}else{
    $len = strlen($username);
    if($len<3){
        echo"用户名至少三个字符<br />";
        $hasError=true;
    }
}


$password = $_POST["password"];
if(!$password){
    echo"密码必须填写<br/>";
    $hasError=true;
}
if($hasError)
    echo"检查成功";

echo "<a href='base_html_complex.html'>返回</a>";
?>